package main

import "fmt"

func main()  {
	/**
	 * bool和int不能互相转换
	 */

	//字符型转整型
	var ch byte  = 'a'
	var t int
	t = int(ch)
	fmt.Printf("ch ==> int %d\n", t)

	//整型转字符型
	var a int  = 97
	var b byte
	b = byte(a)
	fmt.Printf("a ==> byte %c\n", b)

	//整型转浮点型
	var c int  = 20
	var d float64
	d = float64(c)
	fmt.Printf("c ==> float %f\n", d)
}
